/*
 *  $Id: UniqueThenn.cs 1061 2010-05-20 16:23:23Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Fire.Creatures {
    public class UniqueThenn: CreatureCard {
        public UniqueThenn(): base("001_f_c_u_thenn") {
            Level = CompleteLevel.ReadyForTest;
            Version = 0;
            Element = ElementType.Fire;
            Value = 100;
            MaxCount = 1;
            Damage = 3;
            Health = 8;
            AddManaCost(10);
        }

        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add<Affects.Hero>();
            Affects.Turnskin turnskin = new Affects.Turnskin();
            turnskin.AddForm(new Languages.Names(GetResourceId("form.human"), true), false,
                new Affects.AbilityAffect(CardManager.GetAbility<Abilities.KnowledgeOfFire>()),
                new CasterForm(),
                new Affects.Antimagic());
            turnskin.AddForm(RaceManager.GetRace<Races.Dragon>().Name, true,
                new Affects.AbilityAffect(CardManager.GetAbility<Abilities.ReignOfFire>()),
                new Affects.ModDamage(4),
                new Affects.Flight(),
                new Affects.MultiBlock(3));
            affects.Add(turnskin);
        }

        public override void SetAbilities(ICollector<AbilityCard> abilities) {
            abilities.Add(Neutral.Abilities.Turnskin.CreateNew<UniqueThenn>());
        }

        public static bool IsCasterForm(AbstractObject caster, Card card) {
            return caster.HasFlag<CasterForm>();
        }

        public class CasterForm: FlagAffect {
            public override string Id {
                get { return AffectManager.GetCardId<UniqueThenn>("human"); }
            }
        }
    }
}
